<!--
/**
 * 数据库变更申请 列表页 JS 脚本
 * @author 金杰 , maillank@qq.com
 * @since 2024-03-31 22:50:15
 */
 -->
 <!DOCTYPE html>
<html style="background-color: #FFFFFF;">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
    <meta name="referrer" content="no-referrer">
	<title th:text="${lang.translate('数据库变更申请')}">数据库变更申请</title>
    <link th:if(theme.ico!="null") rel="shortcut icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon">
    <link th:if(theme.ico!="null") rel="icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css" th:href="'/assets/libs/layui/css/layui.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/css/admin.css" th:href="'/assets/css/admin.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/libs/toast/css/toast.css" type="text/css" th:href="'/assets/libs/toast/css/toast.css?'+${cacheKey}">
    <link rel="stylesheet" href="/assets/css/foxnic-web.css" th:href="'/assets/css/foxnic-web.css?'+${cacheKey}"/>
    <link href="/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/assets/libs/material-design-webfont/css/material-design-icons-min.css" rel="stylesheet">
    <script th:inline="javascript">var foxnic_cachekey=[[${cacheKey}]];</script>
    <style>
    </style>
    <link th:each="css:${theme.css}" rel="stylesheet" th:href="${css}+'?'+${cacheKey}">
</head>

<body style="overflow-y: hidden;">
<div class="form-container" >

    <form id="data-form" lay-filter="data-form" class="layui-form model-form" style="opacity:0">

        <input name="id" id="id"  type="hidden"/>

         <!--开始：group 循环-->

        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-1965-fieldset">
            <legend>关联信息</legend>
        </fieldset>

        <div class="layui-row form-row" id="random-1965-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >

                <!-- select_box : 关联工单 ,  itemCode  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('关联工单')}">关联工单</div></div>
                    <div class="layui-input-block ">
                        <div id="itemCode" input-type="select" th:data="${'/service-ops/ops-db-apply-execute/query-paged-list?business=change'}" extraParam="{}"></div>
                    </div>
                </div>
            
                <!-- text_input : 备注 ,  notes -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('备注')}">备注</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="notes" id="notes" name="notes" th:placeholder="${ lang.translate('请输入'+'备注') }" type="text" class="layui-input"  />
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >

                <!-- select_box : 数据库 ,  dbId  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('数据库')}">数据库</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <div id="dbId" input-type="select" th:data="${'/service-ops/ops-db-info-apply/query-execute-db-paged-list?business=change'}" extraParam="{}"></div>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->

        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-9907-fieldset">
            <legend>【SQL内容区域】DML和DDL分开，先执行SQL框，后执行SQL文件</legend>
        </fieldset>

        <div class="layui-row form-row" id="random-9907-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs12 form-column" >
<!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->

        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-3441-fieldset">
            <legend>【事务说明】每个DML文件一个事务</legend>
        </fieldset>

        <div class="layui-row form-row" id="random-3441-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs12 form-column" >
<!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->

        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-3159-fieldset">
            <legend>执行的SQL文本放于此处</legend>
        </fieldset>

        <div class="layui-row form-row" id="random-3159-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs12 form-column" >

                <!-- text_area : SQL文本 ,  sqlArea  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('SQL文本')}">SQL文本</div></div>
                    <div class="layui-input-block ">
                        <textarea lay-filter="sqlArea" id="sqlArea" name="sqlArea" th:placeholder="${ lang.translate('请输入'+'SQL文本') }" class="layui-textarea" style="height: 150px" ></textarea>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->
        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-3819-fieldset">
        <legend>SQL过多时可按顺序以附件形式上传</legend>
        </fieldset>
        <div class="layui-row form-row" style="text-align: center;" id="random-3819-content">
            <div style="display: inline-block;padding-right: 8px;padding-left: 8px" class="layui-col-xs12">
            <iframe id="random-3819-iframe" js-fn="sqlList" class="form-iframe" frameborder="0" style="width: 100%"></iframe>
            </div>
        </div>
         <!--开始：group 循环-->

        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-6084-fieldset">
            <legend>【验证SQL】</legend>
        </fieldset>

        <div class="layui-row form-row" id="random-6084-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >

                <!-- button : - ,  buttonCheck  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('-')}">-</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="buttonCheck" id="buttonCheck" name="buttonCheck"  type="hidden" class="layui-input"   />
                        <button id="buttonCheck-button" type="button" action-type="" class="layui-btn  check-Sql " style="width: 100%" default-width="100%" auto-width="false">  <span th:text="${lang.translate('验证')}" th:default-label="${lang.translate('验证')}">按钮文本</span></button>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >
<!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->


        <div class="layui-row form-row" id="random-5591-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column"  style="padding-top: 0px" >

                <!-- select_box : 验证结果 ,  checkResult  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('验证结果')}">验证结果</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <div id="checkResult" input-type="select" th:data="${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbApplyCheckEnum')}" extraParam="{}"></div>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column"  style="padding-top: 0px" >

                <!-- button : - ,  buttonCheckDetail  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('-')}">-</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="buttonCheckDetail" id="buttonCheckDetail" name="buttonCheckDetail"  type="hidden" class="layui-input"   />
                        <button id="buttonCheckDetail-button" type="button" action-type="" class="layui-btn  check-Sql-result " style="width: 100%" default-width="100%" auto-width="false">  <span th:text="${lang.translate('结果明细')}" th:default-label="${lang.translate('结果明细')}">按钮文本</span></button>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->

        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-5664-fieldset">
            <legend>【回滚/备份】</legend>
        </fieldset>

        <div class="layui-row form-row" id="random-5664-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >

                <!-- button : - ,  buttonRB  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('-')}">-</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="buttonRB" id="buttonRB" name="buttonRB"  type="hidden" class="layui-input"   />
                        <button id="buttonRB-button" type="button" action-type="" class="layui-btn  rb-Sql " style="width: 100%" default-width="100%" auto-width="false">  <span th:text="${lang.translate('回滚/备份')}" th:default-label="${lang.translate('回滚/备份')}">按钮文本</span></button>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >
<!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->


        <div class="layui-row form-row" id="random-9480-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column"  style="padding-top: 0px" >

                <!-- select_box : 回滚/备份 ,  rbResult  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('回滚/备份')}">回滚/备份</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <div id="rbResult" input-type="select" th:data="${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbApplyRbEnum')}" extraParam="{}"></div>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column"  style="padding-top: 0px" >

                <!-- button : - ,  buttonRBDetail  -->
                <div class="layui-form-item" inlines=""  inline-delta="0" input-width="">
                    <div class="layui-form-label "><div th:text="${lang.translate('-')}">-</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="buttonRBDetail" id="buttonRBDetail" name="buttonRBDetail"  type="hidden" class="layui-input"   />
                        <button id="buttonRBDetail-button" type="button" action-type="" class="layui-btn  rb-Sql-result " style="width: 100%" default-width="100%" auto-width="false">  <span th:text="${lang.translate('结果明细')}" th:default-label="${lang.translate('结果明细')}">按钮文本</span></button>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
        <!--结束：group循环-->

        <div style="height: 8px"></div>
        <div style="height: 120px"></div>


    </form>

</div>
<div class="model-form-footer">
    <button class="layui-btn layui-btn-primary" id="cancel-button" lay-filter="cancel-button" type="button" th:text="${lang.translate('取消','','form.button')}" >取消</button>
    <button th:if="${perm.checkAnyAuth('ops_db_change_apply:create','ops_db_change_apply:update','ops_db_change_apply:save')}" class="layui-btn" style="margin-right: 15px;display: none;"  id="submit-button" lay-filter="submit-button" lay-submit th:text="${lang.translate('保存','','form.button')}">保存</button>
</div>

<script type="text/javascript" src="/module/global.js" th:src="'/module/global.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/jquery-3.2.1.min.js" th:src="'/assets/libs/jquery-3.2.1.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/pandyle.min.js" th:src="'/assets/libs/pandyle.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/layui/layui.js" th:src="'/assets/libs/layui/layui.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/toast/js/toast.js" th:src="'/assets/libs/toast/js/toast.js?'+${cacheKey}"></script>
<script th:inline="javascript">
    var LAYUI_TABLE_WIDTH_CONFIG = [[${layuiTableWidthConfig}]];
    var RADIO_STATUS_DATA = [[${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbApplyStatusEnum')}]];
    var SELECT_CHECKRESULT_DATA = [[${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbApplyCheckEnum')}]];
    var SELECT_RBRESULT_DATA = [[${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbApplyRbEnum')}]];
    var SELECT_PUSHORDERSTATUS_DATA = [[${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbApplyOrderStatusEnum')}]];
    var VALIDATE_CONFIG={"rbResult":{"labelInForm":"回滚/备份","inputType":"select_box","required":true},"dbId":{"labelInForm":"数据库","inputType":"select_box","required":true},"checkResult":{"labelInForm":"验证结果","inputType":"select_box","required":true}};
    var AUTH_PREFIX="ops_db_change_apply";

    // uuid
    var UUID = [[${uuid}]] ;
    // associatedSystem
    var ASSOCIATED_SYSTEM = [[${associatedSystem}]] ;

</script>



<script th:src="'/business/ops/db_change_apply/db_change_apply_ext.js?'+${cacheKey}"></script>
<script th:src="'/business/ops/db_change_apply/db_change_apply_form.js?'+${cacheKey}"></script>

</body>
</html>